﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProjectForm.aspx.cs" Inherits="BaseData_ProjectForm" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
     <title>当前位置:项目管理→项目编辑</title>
	<link href="../css/css.css" rel="stylesheet" type="text/css" />
	<!--#include file="../js/KeyControl.js"-->
	<script src="../js/calendar.js" type ="text/javascript"></script>
	<base target="_self" />	
	<script type="text/javascript" language="JavaScript">
		function CheckFormMenu()
		{		
		
		    if(document.form1.txtProjectCode.value == "0")
			{
				alert("请输入项目编号！");
				document.form1.txtProjectCode.focus();
				return false;
			}
		    if(document.form1.txtProjectName.value.length >20)
		    {
			    alert("请输入项目名称！");
			    document.form1.txtProjectName.focus();
			    return false;
		    }	
		       var btnSave=window.document.getElementById("btnSave");
		       if(btnSave!=null)
		       btnSave.click();
		}
		
		//增加承建单位的选择
		var count2 = 0;
		function setChoiceName_1()
            {  if(count2 == 0){  oldChoiceName_1 = document.getElementById('ChoiceName_1').value; count2 ++; }   }
        function getChoiceName_1()
            {newChoiceName_1 = document.getElementById('ChoiceName_1').value;}
            
            
            
      /////调用人员选择树      
      //选择人员信息
      var sChoiceID;              //所在赋值的关键字  
      var ChoiceNameInfo;         //选择的名称集合

      var ChoiceIDInfo;           //选择的ID集合
      var iChoicePoNumber1 =1;     //0表示任意多,其它的正整数为可以选择的最大个数.不可以为负数      
      var iChoicePoNumber2 =0; 
      function GetMyPersTree(obj)
      {
         var sOrgIDCol = form1.HOrgIDCol.value;
         var sFeatures = "dialogHeight:600px;dialogWidth:700px;resizeable:no;help:no;status:no";
         var obj = showModalDialog("../SysManage/ChoicePersInfo.aspx?ChoiceID="+obj+"&OrgType=2&OrgIDCol=0",window,sFeatures);
         if(obj != undefined)
         {
             sChoiceID = obj.sChoiceID;
             ChoiceNameInfo = obj.ChoiceNameInfo;
             ChoiceIDInfo=obj.ChoiceIDInfo;
             eval("form1.ChoiceName_"+sChoiceID+".value="+ChoiceNameInfo+";");
             eval("form1.HChoiceID_"+sChoiceID+".value="+ChoiceIDInfo+";"); 
             //eval("form1.HNewChoiceID_"+sChoiceID+".value="+ChoiceIDInfo+";"); 
             eval("form1.ChoiceName_"+sChoiceID+".blur()");
         }
      }
      
          
      //选择组织信息
      var sChoiceID;               //所在赋值的关键字
      var ChoiceNameInfo;          //选择的名称集合

      var ChoiceIDInfo;            //选择的ID集合
      var iChoicePoNumber1 =1;     //0表示任意多,其它的正整数为可以选择的最大个数.不可以为负数
      function GetMyTree(obj)
      {
         var sOrgIDCol = form1.HOrgIDCol.value;
         var sFeatures = "dialogHeight:600px;dialogWidth:400px;resizeable:no;help:no;status:no";
         //var obj = showModalDialog("../SysManage/ChoiceOrgInfo.aspx?ChoiceID="+obj+"&OrgType=2&OrgIDCol="+sOrgIDCol,window,sFeatures);
         var obj = showModalDialog("../SysManage/ChoiceOrgInfo.aspx?ChoiceID="+obj+"&OrgType=2&OrgIDCol=0",window,sFeatures);
         if(obj != undefined)
         if(obj != undefined)
         {
            sChoiceID = obj.sChoiceID;
            ChoiceNameInfo = obj.ChoiceNameInfo;
            ChoiceIDInfo=obj.ChoiceIDInfo;
            eval("form1.ChoiceName_"+sChoiceID+".value="+ChoiceNameInfo+";");  //ChoiceName_1 更换为 txtProjectCustomcom
            eval("form1.HChoiceID_"+sChoiceID+".value="+ChoiceIDInfo+";"); 
            eval("form1.ChoiceName_"+sChoiceID+".blur()");
            
            
         }
      }
			
	</script>

</head>
<body  style =" background-image :url('../images/hit_bg.gif');"> 
	<% 
		Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
		Response.Expires = 0;
		Response.CacheControl = "no-cache";
	%>
	<form id="form1" runat="server">
	   <input type="hidden" id="HOrgIDCol" runat="server" />
		<div>
<table style ="width :98%;"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr style ="height :10;">
    <td></td>
 </tr> 
</table>

<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#327AC6">
    <tr>
		<td style ="background-color :#F9F9FB; width :80;">项目编号</td>
		<td  style ="background-color :#F9F9FB;"><asp:TextBox ID="txtProjectCode" runat="server" MaxLength="20" Width="100px"></asp:TextBox><font color="#FF0000">*</font><asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="不能为空" ControlToValidate="txtProjectCode"></asp:RequiredFieldValidator>
		</td>
		<td style ="background-color :#F9F9FB; width :80;">项目名称</td>
		<td style ="background-color :#F9F9FB;"><asp:TextBox ID="txtProjectName" runat="server" MaxLength="20" Width="100px"></asp:TextBox><font color="#FF0000">*</font><asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="不能为空" ControlToValidate="txtProjectName"></asp:RequiredFieldValidator>
		</td>
	</tr>
	<tr>
		<td style ="background-color :#F9F9FB;">项目简称</td>
		<td style ="background-color :#F9F9FB;"><asp:TextBox ID="txtProjectSname" runat="server" MaxLength="20" Width="100px"></asp:TextBox><font color="#FF0000">*</font><asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="不能为空" ControlToValidate="txtProjectSname"></asp:RequiredFieldValidator>
		</td>
		<td style ="background-color :#F9F9FB;">项目建设单位</td>
		<td style ="background-color :#F9F9FB;"><asp:TextBox ID="txtProjectConstructcom" runat="server" MaxLength="20" Width="100px"></asp:TextBox><font color="#FF0000">*</font><asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="不能为空" ControlToValidate="txtProjectConstructcom"></asp:RequiredFieldValidator>
		</td>
	</tr>
    <tr>
        <td style ="background-color :#F9F9FB;">项目级别</td>
        <td style ="background-color :#F9F9FB;">
            <asp:DropDownList ID="DDList_projectlevel" runat="server" Width="100px" >
            <asp:ListItem>请选择</asp:ListItem>
            <asp:ListItem Value="1">A</asp:ListItem>
            <asp:ListItem Value="2">B</asp:ListItem>
          </asp:DropDownList></td>
        <td style ="background-color :#F9F9FB;">项目类型</td>
        <td style ="background-color :#F9F9FB;">
			<asp:DropDownList ID="DDList_projecttype" runat="server" Width="100px" >
            <asp:ListItem>请选择</asp:ListItem>
            <asp:ListItem Value="1">咨询类</asp:ListItem>
              <asp:ListItem Value="2">一阶段设计</asp:ListItem>
              <asp:ListItem Value="3">软课题类</asp:ListItem>
          </asp:DropDownList></td>
    </tr>
    
    <tr>
		<td style ="background-color :#F9F9FB;">承建单位</td>
		<td style ="background-color :#F9F9FB;">
		    <asp:TextBox ID="ChoiceName_1" runat="server" MaxLength="20" Width="100px" tabindex="15" readonly="true"></asp:TextBox>
		    <input type="hidden" id="HChoiceID_1" runat="server" />    
		    <img id="OrgImg1" runat="server" src="../images/danwei.gif" width="20" height="17" onmouseover="setChoiceName_1();" onclick="GetMyTree(1)" alt="选择组织" /><font color="#FF0000">*</font>		        
		    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="不能为空" ControlToValidate="ChoiceName_1"></asp:RequiredFieldValidator>
		</td>
		<td style ="background-color :#F9F9FB;">项目负责人</td>
		<td style ="background-color :#F9F9FB;">
		    <asp:TextBox ID="ChoiceName_3" runat="server" MaxLength="20" Width="100px"></asp:TextBox>
		    <input type="hidden" id="HChoiceID_3" runat ="server" />
   		    <img id="Img1" runat="server" src="../images/danwei.gif" width="20" height="17" onmouseover="setChoiceName_1();" onclick="GetMyPersTree(3)" alt="选择人员" />   		    
		    <font color="#FF0000">*</font>
		    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="不能为空" ControlToValidate="ChoiceName_3"></asp:RequiredFieldValidator>
		</td>
	</tr>
	<tr>
		<td style ="background-color :#F9F9FB;">项目组成员</td>
		<td style ="background-color :#F9F9FB;">
		    <asp:TextBox ID="ChoiceName_2" runat ="server" TabIndex ="3" onclick ="GetMyPersTree(2)" Width="100px"></asp:TextBox>
            <input type="hidden" id="HChoiceID_2" runat ="server" />		    
		    <img id="Img2" runat="server" src="../images/danwei.gif" width="20" height="17"  onclick="GetMyPersTree(2)" alt="选择人员" /></td>
		<td style ="background-color :#F9F9FB;">所属本地网</td>
		<td style ="background-color :#F9F9FB;"><asp:TextBox ID="txtProjectOrgid" runat="server" MaxLength="20" Width="100px"></asp:TextBox><font color="#FF0000">*</font><asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ErrorMessage="不能为空" ControlToValidate="txtProjectOrgid"></asp:RequiredFieldValidator>
		</td>
	</tr>
	<tr>
		<td style ="background-color :#F9F9FB;">开始日期</td>
		<td style ="background-color :#F9F9FB;"><asp:TextBox ID="txtProjectStartdate" runat="server"  onclick="calendardate(this,true);"  MaxLength="20" Width="100px"></asp:TextBox><font color="#FF0000">*</font><asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="不能为空" ControlToValidate="txtProjectStartdate"></asp:RequiredFieldValidator>
		</td>
		<td style ="background-color :#F9F9FB;">结束日期</td>
		<td style ="background-color :#F9F9FB;"><asp:TextBox ID="txtProjectEnddate" runat="server" onclick="calendardate(this,true);"  MaxLength="20" Width="100px"></asp:TextBox><font color="#FF0000">*</font><asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ErrorMessage="不能为空" ControlToValidate="txtProjectEnddate"></asp:RequiredFieldValidator>
		</td>
	</tr>
	<tr>
		<td style ="background-color :#F9F9FB;">所属项目</td>
		<td style ="background-color :#F9F9FB;">
             <asp:DropDownList ID="txtProjectPid" DataTextField ="project_name" DataValueField ="project_id" runat="server" AutoPostBack="True" OnSelectedIndexChanged="txtProjectPid_SelectedIndexChanged" ></asp:DropDownList><font color="#FF0000">*</font>		</td>
		<td style ="background-color :#F9F9FB;">预警天数</td>
		<td style ="background-color :#F9F9FB;"><asp:TextBox ID="txtProjectRemind" runat="server" MaxLength="20" Width="100px"></asp:TextBox><font color="#FF0000">*</font><asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ErrorMessage="不能为空" ControlToValidate="txtProjectRemind"></asp:RequiredFieldValidator>
		</td>
	</tr>
	<tr>
		<td style ="background-color :#F9F9FB;">项目状态</td>
		<td style ="background-color :#F9F9FB;">
		   <asp:DropDownList ID="DDList_ProjectStatus" runat="server" Width="100px" >
            <asp:ListItem>请选择</asp:ListItem>
            <asp:ListItem Value="1">勘察</asp:ListItem>
              <asp:ListItem Value="2">设计</asp:ListItem>
              <asp:ListItem Value="3">会审</asp:ListItem>
          </asp:DropDownList></td>
		<td  style ="background-color :#F9F9FB;">项目备注</td>
		<td style ="background-color :#F9F9FB;"><asp:TextBox ID="txtProjectMemo" TextMode ="multiLine" Rows ="3" Columns ="25" runat="server" ></asp:TextBox><font color="#FF0000">*</font><asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ErrorMessage="不能为空" ControlToValidate="txtProjectMemo"></asp:RequiredFieldValidator>
		</td>
	</tr>	
	<tr>
		<td height="36" colspan="4" bgcolor="#F9F9FB">
			<div align="center">
				<asp:Button ID="btnSave" runat="server" Text="提交" Width="0px" Height="0px" BackColor="White"
					BorderColor="White" ForeColor="White" />
				&nbsp;&nbsp;&nbsp;
				<input type="button" id="Button1" value="提交" class="button02" onclick="CheckFormMenu();" />
				<input type="button" id="btnClose" value="关闭" class="button02" onclick="window.close();" />
			</div>
		</td>
	</tr>
	</table>
</div>
<input type="hidden" id="hcline_Id" runat="server" />
<input type="hidden" id="hidEditType" runat="server" />
<input type="hidden" id="HidID" runat="server" />
<input type="hidden" id="HidType" runat="server" />
<input type="hidden" id="hNewParentID1" runat="server" />
<input type="hidden" id="hNewOrgID1" runat="server" />
<input type="hidden" id="CheckBox" name="CheckBox" runat="server" />
        
      
	</form>
</body>
</html>
